<template>
	<view class="margin-bottom">
		<view>
			<u-swiper :list="swiperList" :border-radius="0"></u-swiper>
		</view>
		<view class="margin-top bg-white">
			<u-card margin="0" :body-style="{padding: 0}" :border="false">
				<view slot="head">
					<text class="cuIcon-titles text-orange"></text>
					组织用户
				</view>
				<view slot="body">
					<u-grid :col="3">
						<u-grid-item @click="navTo('../org/index')">
							<image src="/static/images/orgm.png" mode="aspectFill"></image>
							<view class="grid-text">组织管理</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../user/index')">
							<image src="/static/images/userm.png" mode="aspectFill"></image>
							<view class="grid-text">用户管理</view>
						</u-grid-item>
					</u-grid>
				</view>
			</u-card>
		</view>
		<view class="margin-top bg-white">
			<u-card margin="0" :body-style="{padding: 0}" :border="false">
				<view slot="head">
					<text class="cuIcon-titles text-orange"></text>
					角色资源
				</view>
				<view slot="body">
					<u-grid :col="3">
						<u-grid-item @click="navTo('../role/index')">
							<image src="/static/images/rolem.png" mode="aspectFill"></image>
							<view class="grid-text">角色管理</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../auth/index')">
							<image src="/static/images/authm.png" mode="aspectFill"></image>
							<view class="grid-text">权限管理</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../menu/index')">
							<image src="/static/images/menum.png" mode="aspectFill"></image>
							<view class="grid-text">菜单管理</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../elem/index')">
							<image src="/static/images/elem.png" mode="aspectFill"></image>
							<view class="grid-text">元素管理</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../res/index')">
							<image src="/static/images/resm.png" mode="aspectFill"></image>
							<view class="grid-text">资源管理</view>
						</u-grid-item>
					</u-grid>
				</view>
			</u-card>
		</view>
		<view class="margin-top bg-white">
			<u-card margin="0" :body-style="{padding: 0}" :border="false">
				<view slot="head">
					<text class="cuIcon-titles text-orange"></text>
					应用配置
				</view>
				<view slot="body">
					<u-grid :col="3">
						<u-grid-item @click="navTo('../dict/index')">
							<image src="/static/images/dictm.png" mode="aspectFill"></image>
							<view class="grid-text">数据字典</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../appm/index')">
							<image src="/static/images/appm.png" mode="aspectFill"></image>
							<view class="grid-text">应用授权</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../holiday/index')">
							<image src="/static/images/holidaym.png" mode="aspectFill"></image>
							<view class="grid-text">节假配置</view>
						</u-grid-item>
					</u-grid>
				</view>
			</u-card>
		</view>
		<view class="margin-top bg-white">
			<u-card margin="0" :body-style="{padding: 0}" :border="false">
				<view slot="head">
					<text class="cuIcon-titles text-orange"></text>
					功能模块
				</view>
				<view slot="body">
					<u-grid :col="3">
						<u-grid-item @click="navTo('../logs/index')">
							<image src="/static/images/logm.png" mode="aspectFill"></image>
							<view class="grid-text">应用日志</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../sched/index')">
							<image src="/static/images/schm.png" mode="aspectFill"></image>
							<view class="grid-text">任务调度</view>
						</u-grid-item>
						<u-grid-item @click="navTo('../rule/index')">
							<image src="/static/images/rulem.png" mode="aspectFill"></image>
							<view class="grid-text">规则引擎</view>
						</u-grid-item>
						<u-grid-item>
							<image src="/static/images/wkfm.png" mode="aspectFill"></image>
							<view class="grid-text">工作流程</view>
						</u-grid-item>
					</u-grid>
				</view>
			</u-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				swiperList: [{
					image: '/static/images/swiper1.jpg'
				}, {
					image: '/static/images/swiper2.jpg'
				}]
			}
		},
		onLoad() {
			this.$request.get('/admin/sys/user_info', {}, res => {})
		},
		methods: {
			// 页面导航
			navTo: function(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.u-grid-item {
		image {
			width: 60rpx;
			height: 60rpx;
		}
	}
</style>
